import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

const router = new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: resolve => require(['@/pages/pageTwo.vue'], resolve),
      meta: {title: '首页'}
    },
    {
      path: '/list',
      name: 'list',
      component: resolve => require(['@/pages/pageOne.vue'], resolve),
      meta: {title: '列表'}
    },
    {
      path: '/info',
      name: 'info',
      component: resolve => require(['@/pages/pageOne.vue'], resolve),
      meta: {title: '详情'}
    },
    {
      path: '*',
      redirect: '/',
      meta: {title: '首页'}
    }
  ]
});

export default router;
